package sk.klimo.prototyp.client;

import com.google.gwt.user.client.Command;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.DockPanel;
import com.google.gwt.user.client.ui.MenuBar;

public class HeaderPane extends Composite {

	public HeaderPane() {

		super();
		DockPanel rootPanel = new DockPanel();
		initWidget(rootPanel);

		rootPanel.setSize("100%", "100%");
		// Make a command that we will execute from all leaves.
		Command cmd = new Command() {
			public void execute() {
				Window.alert("You selected a menu item!");
			}
		};

		// Make some sub-menus that we will cascade from the top menu.
		MenuBar fileMenu = new MenuBar(true);
		fileMenu.addItem("Formular", cmd);
		fileMenu.addItem("Zostava", cmd);

		MenuBar helpMenu = new MenuBar(true);
		helpMenu.addItem("Pomocnik", cmd);
		helpMenu.addItem("O programe..", cmd);

		// Make a new menu bar, adding a few cascading menus to it.
		MenuBar menu = new MenuBar();
		menu.addItem("Pohlad", fileMenu);
		menu.addItem("Pomoc", helpMenu);

		// Add it to the root panel.
		rootPanel.add(menu, DockPanel.CENTER);
	}

}
